In recent years, the number of users on the internet has increased exponentially. With this increase in popularity, there has also come an increased demand for tools which enhance the xe2x80x9con line experience.xe2x80x9d To this end, new object oriented computer programming languages such as Java(trademark) have been developed. While these languages are an advance over prior technology, there is still room for improvement, particularly in the ability to efficiently modify layout of complex structures of graphical objects in variable sized windows. It is difficult to implement high quality, real time graphics on a web site using these languages.
Java allows minimum and maximum sizes to be specified for graphical objects and uses those values in a way that causes objects to act more stretchy when the differences between their minimum and maximum sizes is large.
A language explicitly developed for internet applications is the MIT Curl Language by M. Hostetter et al, xe2x80x9cCurl: A Gentle Slope Language for the Web,xe2x80x9d WorldWideWeb Journal, Vol II. Issue 2, O""Reilly and Associates, Spring 1997. The present invention extends the Curl language. (The language of the present invention will be referenced as xe2x80x9cCurlxe2x80x9d and is to be distinguished from the prior xe2x80x9cMIT Curlxe2x80x9d language.) MIT Curl used a three-pass layout negotiation scheme and allowed objects to describe their size preferences in terms of a minimum size and a stretchiness coefficient.
TeX is a widely used text formatting program developed by Donald Knuth. Donald E. Knuth, The TeXBook, Addison-Wesley, Reading, Mass., 1984. TeX uses a concept known as xe2x80x9cgluexe2x80x9d to express dimensional preferences of fill objects and incorporates different stretch and compression orders that can be used to describe the stretchiness and compressibility of different kinds of fill objects. As the overall dimensions of a layout change, the dimensions of individual fill objects change dependent on preferred sizes and stretchiness of those objects.
A graphics tool kit developed by Robert Halstead called Stk incorporates the concept of an elastic, known as xe2x80x9cglue,xe2x80x9d having a minimum size, a stretchiness coefficient and a stretch order associated with graphical objects having content. The tool kit formalizes the layout computations of horizontal and vertical boxes of graphical objects in terms of elastic add, max and divide operations. Stk is not widely known or used. The layout mechanism of Stk was incorporated into Swat, a graphics toolkit developed at MIT by Harold Abelson, James Miller and Natalya Cohen.
In accordance with the present invention, a system, method and data structure are provided to facilitate the processing of plural blocks of text to lay out the text. A preferred width and compressibility of each block of text are defined as a function of the amount of text in the block of text. The width and compressibilities of the blocks of text are processed to define an overall layout of the blocks of text.
A preferred data structure defining a block of text comprises text data, a preferred width of the text data and a compressibility property for the width of the text data.
Preferably, a stretchiness to each block of text is defined separately from the compressibility, and the stretchiness of the text is substantially greater than its compressibility. Stretchiness may be defined by a stretch order and stretchiness coefficient, and compressibility may be defined by a compress order and compressibility coefficient, the stretch order of the text being greater than the compressibility order.
Preferably, the text data structure further includes a preferred size of each block of text to lay out the text in a minimum number of lines. A compressibility coefficient is defined to be proportional to a text length, specifically the length of the longest paragraph in the text block.